/**
 * 
 *
 * 
 * 
 */
package com.east196.xfast.service;

import java.util.List;

import com.east196.xfast.common.base.BaseService;
import com.east196.xfast.model.MetaField;
import com.east196.xfast.model.MetaObject;

/**
 * 元数据服务
 *
 * @author East196
 * @date 2018-1-3
 */
public class MetaService extends BaseService {

	/**
	 * 获取元数据(对象和字段)
	 * @param objectCode
	 * @return
	 */
	public MetaObject getMeta(String objectCode) {
		MetaObject object = MetaObject.dao.getByCode(objectCode);
		List<MetaField> fields = MetaField.dao.queryByObjectCode(objectCode);
		object.setFields(fields);
		return object;
	}

}
